<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/jquery-3.4.1.min.js"></script>
		<style type="text/css">
			div{
				width: 200px;
				height: 200px;
				border: 2px solid black;
				margin: 20px;
			}
		</style>
	</head>
	<body>
		<div class="box"></div>
		<div class="box"></div>
		<div class="box"></div>
		
		<script>
			//将jQuery包装对象对象转为DOM对象
			var $oBox=$(".box");
			var oBox=$oBox.get(2);  
			oBox.style.background="blue";
			
			//将DOM对象转为jQuery包装对象
			var oBox1=document.getElementsByClassName('box')[0];
			var $oBox1=$(oBox1);
			//调用jQuery的api方法css设定属性
			$oBox1.css('background','red');
		</script>
	</body>
</html>
